<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php $this->load->view('common/head');?>

<?php $this->load->view('common/header');?>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <?php $this->load->view('common/sidebar');?>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <?php $this->load->view('common/breadcrumbs');?>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">

                <?php $this->load->view('common/set');?>

                <!-- /section:settings.box -->
                <div class="row">
                    <?php if(isset($types)){
                    foreach ($types as $key => $value) {?>
                    <a href="<?php echo site_url($thisurl.$value);?>" class="btn <?php if($type==$value){echo 'btn-purple';}else{echo '';}?> btn-sm" id="addshop">
                        <span class="ace-icon fa fa-angle-double-right bigger-110"></span>
                        <?php echo $key;?>
                    </a>
                    <?php }}?>
                    <div class="col-xs-12">
                        <div id="mountNode"></div>
                        <script>/*Fixing iframe window.innerHeight 0 issue in Safari*/document.body.clientHeight;</script>
                        <script src="https://gw.alipayobjects.com/os/antv/assets/g2/3.0.5-beta.5/g2.min.js"></script>
                        <script src="https://gw.alipayobjects.com/os/antv/assets/data-set/0.8.5/data-set.min.js"></script>
                        <script>
                          const data = [
                            { month: '一月', 充值: 7.0, 提现: 3.9 },
                            { month: '二月', 充值: 6.9, 提现: 4.2 },
                            { month: '三月', 充值: 9.5, 提现: 5.7 },
                            { month: '四月', 充值: 14.5, 提现: 8.5 },
                            { month: '五月', 充值: 18.4, 提现: 11.9 },
                            { month: '六月', 充值: 21.5, 提现: 15.2 },
                            { month: '七月', 充值: 25.2, 提现: 17.0 },
                            { month: '八月', 充值: 26.5, 提现: 16.6 },
                            { month: '九月', 充值: 23.3, 提现: 14.2 },
                            { month: '十月', 充值: 18.3, 提现: 10.3 },
                            { month: '十一月', 充值: 13.9, 提现: 6.6 },
                            { month: '十二月', 充值: 9.6, 提现: 4.8 }
                          ];
                          const ds = new DataSet();
                          const dv = ds.createView().source(data);
                          dv.transform({
                            type: 'fold',
                            fields: [ '充值', '提现' ], // 展开字段集
                            key: 'city', // key字段
                            value: 'temperature', // value字段
                          });
                          const chart = new G2.Chart({
                            container: 'mountNode',
                            forceFit: true,
                            height: window.innerHeight
                          });
                          chart.source(dv, {
                            month: {
                              range: [ 0, 1 ]
                            }
                          });
                          chart.tooltip({
                            crosshairs: {
                              type: 'line'
                            }
                          });
                          chart.axis('temperature', {
                            label: {
                              formatter: val => {
                                return val + '';
                              }
                            }
                          });
                          chart.line().position('month*temperature').color('city').shape('smooth');
                          chart.point().position('month*temperature').color('city').size(4).shape('circle').style({
                            stroke: '#f0f0f0',
                            lineWidth: 1
                          });
                          chart.render();
                        </script>
                    </div>
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.page-content -->
       
    </div><!-- /.main-content -->

<?php $this->load->view('common/footer');?>
</div><!-- /.main-container -->

<?php $this->load->view('common/footerjs');?>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(function () {

       

    })

</script>
</body>
</html>
